package com.jch.demo.cd;

import com.jch.demo.cd.config.CrossDomainConfig;
import com.jfinal.server.undertow.UndertowServer;

/**
 * @author: 迩道
 * @create: 2019/09/26 20:33
 **/
public class CrossDomainStart {

    public static void main(String[] args) {
        UndertowServer.create(CrossDomainConfig.class,"undertow.properties").configWeb(builder -> {
            // 配置 Filter
            builder.addFilter("crossFilter", "com.jch.demo.cd.filter.CrossFilter");
            builder.addFilterUrlMapping("crossFilter", "/*");
            builder.addFilterInitParam("crossFilter", "key", "value");
        }).start();
    }
}
